import axios from 'axios'
import url from './url'

// 封装 GET 方法
export const get = (url) => {
  return axios.get(url)
}

// 封装 POST 方法
export const postConfiguration = (data) => {
  return axios.post(url.postConfiguration, data)
}

// 封装 POST 方法
export const postTrees = (data) => {
  return axios.post(url.postTrees, data)
}


export const getDeviceList = () => {
  return axios.get(url.deviceList)
}


export const postOpenVideUrl = (data) => {
  return axios.post(url.postOpenChannelsPlayUrl, data)
}

// 监测点点位信息
export const deviceMap = (data) => {
  return axios.post(url.deviceMap, data);
};

// 监测点详情信息
export const devCodeXq = (data) => {
  return axios.post(url.devCode, data)
}

// 监测点瞬时数据
export const singleDataSs = (data) => {
  return axios.post(url.singleData, data)
}
/**
 * 值班管理
 */
export const getListData = (data) => {
  return axios.get(url.getListData, data)
}

export const getByIdData = (data) => {
  return axios.post(url.getByIdData, data)
}
// 数据总览+各水厂昨日供水量及占比
// export const getOverview = (data) => {
//   return axios.get(url.Overview, data)
// }
export const getOverview = url.Overview